public class Student implements Cloneable{
    public String name;
    public Money m;
    public Student(String name) {
        this.name = name;
        m=new Money();
    }
    @Override
    protected Object clone() throws CloneNotSupportedException {
        Student tmp = (Student) super.clone();
        tmp.m = (Money) this.m.clone();
        return tmp;
    }
}
